package com.libinyn.base.pms.common.validator;

import com.libinyn.base.pms.common.exception.PmsException;
import org.apache.commons.lang.StringUtils;


/**
 * 数据校验
 * @fileName: Assert.java
 * @author: bin.li01
 * @date: 2017/12/15 14:00
 * @version: v1.0.0
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new PmsException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new PmsException(message);
        }
    }
}
